package com.example.shoppingmall.service;

import com.example.shoppingmall.dao.AdminMapper;
import com.example.shoppingmall.pojo.Admin;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminService {
    @Autowired
    private AdminMapper adminMapper;

    public List<Admin> adminList(@Param("no")int no){
        return adminMapper.adminList(no);
    }

    public int add(Admin admin){
        return adminMapper.add(admin);
    }

    public Admin xiangQing(@Param("id")int id){
        return adminMapper.xiangQing(id);
    }

    public int count(){
        return adminMapper.count();
    }

    public Admin chackAccount(@Param("account")String account){
        return adminMapper.chackAccount(account);
    }

    public Admin chackPhone(@Param("phone")String phone){
        return adminMapper.chackPhone(phone);
    }

    public int delete(@Param("id")Integer id){
        return adminMapper.delete(id);
    }

    public int update(Admin admin){
        return adminMapper.update(admin);
    }

    public int update1(Admin admin){
        return adminMapper.update1(admin);
    }

}
